<template>
    <div class="app-container calendar-list-container">
        <basic-container>
            <owner-card>
                <template slot="btn">
                    <el-button type="primary" size="small" @click="goBack"
                        >返 回</el-button
                    >
                </template>
            </owner-card>
            <house-card>
                <template slot="btn">
                    <el-button
                        v-if="cardType == 'detail'"
                        type="primary"
                        size="small"
                        @click="goPropertyFee"
                        >物业费</el-button
                    >
                    <el-button
                        v-if="cardType == 'unBingding'"
                        type="primary"
                        size="small"
                        @click="returnHouse"
                        >我要退房</el-button
                    >
                </template>
            </house-card>
        </basic-container>
    </div>
</template>

<script>
import OwnerCard from "../../components/ownerCard";
import HouseCard from "../../components/houseCard";
export default {
    name: "ownerDetail",
    components: {
        OwnerCard,
        HouseCard,
    },
    data() {
        return {
            cardType:"",
            propertyFeeDialogVisible: false,
        };
    },
    created() {
        this.cardType = this.$route.query.cardType
    },
    methods: {
        goBack() {
            this.$router.go("-1")
        },
        goPropertyFee() {
            this.$router.push("/owner/ownerInfo/propertyFee/index")
        },
        returnHouse() {
            this.$confirm("确定退房吗?", "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
            })
                .then(() => {
                    this.$message.succcess("退房成功");
                })
                .catch(() => {});
        },
    },
};
</script>

<style lang="scss" scoped>
</style>